import type { AxiosRequestConfig } from 'axios'

export function generateReqKey(config: AxiosRequestConfig) {
  const { pathname } = location
  const { method, url, params, data } = config
  return [method, url, JSON.stringify(params), JSON.stringify(data), pathname].join('&')
}
